package com.vegetable.modules.service.finance;

import com.baomidou.mybatisplus.extension.service.IService;
import com.vegetable.common.utils.PageUtils;
import com.vegetable.common.utils.R;
import com.vegetable.modules.entity.finance.FinancialCollection;
import com.vegetable.modules.entity.finance.FinancialCollectionDetail;
import com.vegetable.modules.entity.finance.po.FinancialCollectionAddPO;
import com.vegetable.modules.entity.finance.po.FinancialCollectionPO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 财务收款管理 服务类
 * </p>
 *
 * @author wangruijie
 * @since 2024-04-13
 */
public interface IFinancialCollectionService extends IService<FinancialCollection> {

    /**
     * 销售收款列表查询
     * @param params
     * @return
     */
    PageUtils queryPage(Map<String, Object> params);

    /**
     * 新增销售收款
     * @param po null
     * @return R
     * @author wrj
     * @since 2024/3/7 下午4:35
     */
    R saveCollection(FinancialCollectionAddPO po) throws Exception;

    R allocatedCollection(FinancialCollectionAddPO po) throws Exception;

    /**
     * 根据id查询销售收款详情
     * @param id null
     * @return R
     * @author wrj
     * @since 2024/7/6 下午2:25
     */
    R detailCollection(Long id);

    /**
     * 销售出库点击对冲查询可对冲回款明细
     * @param id null
     * @return List<FinancialCollectionDetailVO>
     * @author wrj
     * @since 2024/7/6 下午2:40
     */
    R<List<FinancialCollectionDetail>> hedgedDetailList(Long id);

    /**
     * 对冲销售收款确认
     * @param po null
     * @return R
     * @author wrj
     * @since 2024/3/7 下午4:35
     */
    R submitCollection(FinancialCollectionPO po) throws Exception;

    /**
     * 删除销售收款
     * @param id null
     * @return R
     * @author wrj
     * @since 2024/3/7 下午4:35
     */
    R deleteCollection(Long id) throws Exception;

    /**
     * 删除销售收款明细
     * @param id
     * @return
     */
    Boolean deleteDeduction(Long id) throws Exception;
}
